package main

import "sync"

var lock sync.Mutex  = sync.Mutex{}
var a string
var once sync.Once

func setup()  {
	a = "hello world"
	println(a)
}

func doPrint()  {
	once.Do(setup)
}

func twoPrint()  {
	go doPrint()
	go doPrint()
}

func foo()  {
	lock.Lock()
	defer lock.Unlock()
	println("foo lock")
}

func main() {
	//foo()
	twoPrint()
	doPrint()
	doPrint()
}
